#ifndef LOGGER
#define LOGGER

extern unsigned int noLine, noColumn;

#define PARSER_LOG  0x01
#define EFACT_LOG   0x02
#define IFACT_LOG   0x04
#define EEXEC_LOG   0x08
#define IEXEC_LOG   0x10

extern unsigned int _doLog;

extern void setLogFlags ( unsigned int flags );

#define LOGMESSAGE(f,m) if ( ( _doLog & (f) ) > 0 ) \
        std::clog << __FILE__ << " (" << __LINE__ << ") in " << __FUNCTION__ << " : " << m << std::endl

#define LOGFUNCTION(f) if ( ( _doLog & (f) ) > 0 ) \
        std::clog << __FILE__ << " (" << __LINE__ << ") in " << __FUNCTION__ << std::endl

#define LOGPARSER(f) if ( ( _doLog & (f) ) > 0 ) \
        std::clog << __FILE__ << " (" << __LINE__ << ") in " << __FUNCTION__ << "parsing location : " << noLine << "," << noColumn << std::endl

#endif
